package com.yxb.teacher_application.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yxb.teacher_application.mapper.TeacherApplicationMapper;
import com.yxb.teacher_application.domain.TeacherApplication;
import com.yxb.teacher_application.service.ITeacherApplicationService;

/**
 * 家教申请Service业务层处理
 * 
 * @author 林德炫
 * @date 2025-03-04
 */
@Service
public class TeacherApplicationServiceImpl implements ITeacherApplicationService 
{
    @Autowired
    private TeacherApplicationMapper teacherApplicationMapper;

    /**
     * 查询家教申请
     * 
     * @param applicationId 家教申请主键
     * @return 家教申请
     */
    @Override
    public TeacherApplication selectTeacherApplicationByApplicationId(Long applicationId)
    {
        return teacherApplicationMapper.selectTeacherApplicationByApplicationId(applicationId);
    }

    /**
     * 查询家教申请列表
     * 
     * @param teacherApplication 家教申请
     * @return 家教申请
     */
    @Override
    public List<TeacherApplication> selectTeacherApplicationList(TeacherApplication teacherApplication)
    {
        return teacherApplicationMapper.selectTeacherApplicationList(teacherApplication);
    }

    /**
     * 新增家教申请
     * 
     * @param teacherApplication 家教申请
     * @return 结果
     */
    @Override
    public int insertTeacherApplication(TeacherApplication teacherApplication)
    {
        return teacherApplicationMapper.insertTeacherApplication(teacherApplication);
    }

    /**
     * 修改家教申请
     * 
     * @param teacherApplication 家教申请
     * @return 结果
     */
    @Override
    public int updateTeacherApplication(TeacherApplication teacherApplication)
    {
        return teacherApplicationMapper.updateTeacherApplication(teacherApplication);
    }

    /**
     * 批量删除家教申请
     * 
     * @param applicationIds 需要删除的家教申请主键
     * @return 结果
     */
    @Override
    public int deleteTeacherApplicationByApplicationIds(Long[] applicationIds)
    {
        return teacherApplicationMapper.deleteTeacherApplicationByApplicationIds(applicationIds);
    }

    /**
     * 删除家教申请信息
     * 
     * @param applicationId 家教申请主键
     * @return 结果
     */
    @Override
    public int deleteTeacherApplicationByApplicationId(Long applicationId)
    {
        return teacherApplicationMapper.deleteTeacherApplicationByApplicationId(applicationId);
    }
}
